package com.dyl.api.sms;


import com.dyl.api.sms.factory.RemoteSmsFallbackFactory;
import com.dyl.common.core.RR;
import com.dyl.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(contextId = "remoteSmsService", value = ServiceNameConstants.DYL_SMS, fallbackFactory = RemoteSmsFallbackFactory.class)
public interface RemoteSmsService {

    @GetMapping(value = "/dylSms/sendSmsPhone/{phone}")
    RR sendSmsPhone(@PathVariable("phone") String phone);

    @GetMapping(value = "/dylSms/querySmsPhone/{phone}/{codes}")
    RR querySmsPhone(@PathVariable("phone") String phone, @PathVariable("codes") String codes);

}
